Q drawers Class
Creates an area that behaves like position: fixed in most modern browsers, including ones on touchscreens. Often used for fixed areas that wind up covered by content as it scrolls over the areas.
Constructor
Q drawers
-
[$options]
-
[$options.triggers=['{{Q}}/img/drawers/up.png',
-
[$options.fullscreen=Q.info.isAndroidStock
-
[$options.beforeSwap=new
-
[$options.onSwap=new
Parameters:
-
[$options]
Array optionalProvide options for this tool
-
[drawers]
Array optionalArray of strings holding html for drawers
-
[container=null]
String optionalOptional jQuery selector for handling scrolling
-
[initial]
Array optionalInformation for the initial animation
-
[index=1]
Integer optionalThe index of the drawer to show, either 0 or 1 -
[delay=0]
Integer optionalDelay before starting initial animation -
[duration=300]
Integer optionalThe duration of the initial animation -
[ease=Q.Animation.linear]
Function optionalThe easing function of the initial animation
-
-
[transition]
Array optionalInformation for the transition animation
-
[duration=300]
Integer optionalThe duration of the transition animation -
[ease=Q.Animation.linear]
Function optionalThe easing function of the transition animation
-
-
[width]
Function optionalOverride the function that computes the width of the drawers
-
[height]
Function optionalOverride the function that computes the height drawers tool
-
[heights=[100,100]
Array optionalArray of [height0, height1] for drawers that are pinned
-
[placeholders=['','']
Array optionalArray of [html0, html1] for drawers that are pinned
-
[behind=[true,false]
Array optionalArray of [boolean0, boolean1] to indicate which drawer is behind the others
-
[bottom=[false,false]
Array optionalArray of [boolean0, boolean1] to indicate whether to scroll to the bottom of a drawer after switching to it
-
[trigger]
Array optionalOptions for the trigger elements
-
[rightMargin=10]
Integer optionalHow many pixels from the right side of the drawers
-
-
[transition=300]
Integer optionalNumber of milliseconds for fading in the trigger images
-
[foregroundZIndex=50]
Integer optionalThe z-index of the drawer in the foreground
-
-
[$options.triggers=['{{Q}}/img/drawers/up.png',
Array'{{Q}}/img/drawers/down.png']] Array of [src0, src1] for img elements that act as triggers to swap drawers. Set array elements to false to avoid rendering a trigger.
-
[$options.fullscreen=Q.info.isAndroidStock
Boolean&& Q.info.isAndroid(1000)]] Whether the drawers should take up the whole screen
-
[$options.beforeSwap=new
IntegerQ.Event()] Occurs right before drawer swap
-
[$options.onSwap=new
IntegerQ.Event()] Occurs right after drawer swap